package com.cee.enums;

import com.cee.util.EnumUtil;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;

/**
 *
 *
 * @Version：1.0
 */
public enum StatusEnum implements BaseEnum<String> {

    /**
     *
     */
    No("N", "No"),

    /**
     *
     */
    Yes("Y", "Yes");

    private String code;

    private String text;

    StatusEnum(String code, String text) {
        this.code = code;
        this.text = text;
    }


    @Override
    public String getCode() {
        return code;
    }


    @JsonValue
    @Override
    public String getText() {
        return text;
    }

    @JsonCreator
    public static StatusEnum createEnum(String code) {
        return EnumUtil.getEnumByCode(StatusEnum.class, code);
    }
}
